﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using IQKS.AWP.DataAccessLayer;
using IQKS.AWP.BusinessObject;

namespace IQKS.AWP.BusinessAccessLayer
{
   public class CandidateDataBAL
    {
        public DataSet GetCandidateDataBAL()
        {
            DataSet objDs;
            try
            {
                objDs = new CandidateDataDAL().GetCandiadateDataDAL(0);

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }


        public DataSet GetActivityEmailTemplateBAL(params object[] param)
        {
            DataSet objDs;

            CandidateDataBO objLMBo;
            try
            {
                objLMBo = new CandidateDataBO();
                objDs = new CandidateDataDAL().GetActivityEmailTemplateNameBindDAL(param);
                if (objDs != null)
                {
                    DataTable objDt = objDs.Tables[0];
                    if (objDt.Rows.Count>0)
                    {
                        objLMBo.GetId = Convert.ToInt32(objDt.Rows[0]["ActivityID"]);
                        
                        
                    }
                    else
                    {
                        objLMBo = null;
                    }
                }

            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }


       

        public DataSet GetActivityEmailTemplateBAL()
        {

            try
            {
                return new CandidateDataDAL().GetActivityEmailTemplateNameBindDAL(0);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message);
            }
        }
        public DataSet GetCandiadateAccrediationCertficateDetails(Int32 CandidateID)
        {
            DataSet objDs;
            try
            {
                objDs = new CandidateDataDAL().GetCandiadateAccrediationCertficateDetails(CandidateID);
            }
            catch (Exception exception)
            {
                throw new ApplicationException(exception.Message);
            }
            return objDs;
        }

    }
}
